<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <style>
        body{background: white;width: 100%}
        .color{ color: #1E9FFF!important;font-weight: bold}
        /*.select input{height: 35px!important;width: 200px}*/
        thead td{background: #3c8dbc!important;color: white}
    </style>
</head>
<body>
<!--<span class="layui-breadcrumb" style="margin-left: 10px;margin-top: 6px;display: block">-->
<!--<span class="color">学籍信息&nbsp;-&nbsp;单一查询</span>-->
<!--</span>-->
<fieldset class="layui-elem-field site-demo-button" style="margin-top: 10px;width: 100%">
    <legend style="font-size: 14px"><span class="color">学生设定</span></legend>
    <table class="layui-table">
        <tr>
            <td>目前操作计划：文化传媒学院2016届毕业论文工作安排 </td>
        </tr>
    </table>
    <table class="layui-table" lay-size="sm" style="width: 600px;margin-left: 10px">
        <tr>
            <td>
                <div class="selects">
                    <label>目前操作专业：</label>
                    <select>
                        <option>新闻学 </option>
                        <option>--请选择--</option>
                        <option>传播新媒体 </option>
                    </select>
                </div>
            </td>
            <td>
                <button class="layui-btn layui-btn-sm layui-btn-normal" style="margin-left: 10px">查询</button>
            </td>
        </tr>
    </table>
    <h3 style="margin-left: 10px">学生列表</h3>
    <table class="layui-table" lay-size="sm">
        <thead>
            <td>序号</td>
            <td>专业</td>
            <td>学号</td>
            <td>姓名</td>
            <td>学级</td>
            <td>在学状态</td>
            <td>论文题目</td>
            <td>导师</td>
            <td>论文当前流程</td>
            <td>操作</td>
        </thead>
        <tr>
            <td>1</td>
            <td>新闻学(网络传播方向)</td>
            <td>12429501110012</td>
            <td>姬绪刚</td>
            <td>2012</td>
            <td>在读</td>
            <td>《延河时刊》</td>
            <td>(81041565)曹小娟</td>
            <td>5/5</td>
            <td>
               <span style="color: blue;cursor: pointer;text-decoration: underline"> 设置</span>
            </td>
        </tr>
    </table>
</fieldset>
<!--新增计划-->
<div style="display: none;" id="jihua">
    <table class="layui-table">
        <tr>
            <td>目前操作计划：文化传媒学院2016届毕业论文工作安排 </td>
        </tr>
    </table>
    <h3 style="margin-left: 10px">专业列表</h3>
    <table class="layui-table" lay-size="sm">
        <thead>
        <td>序号</td>
        <td>专业</td>
        <td>流程设定</td>
        <td>导师设定</td>
        <td>学生设定</td>
        <td>小组设定</td>
        </thead>
        <tr>
            <td>1</td>
            <td>	新闻学（网络传播方向）(0121500102)</td>
            <td>6</td>
            <td>15</td>
            <td>91</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2</td>
            <td>新闻学（密苏里合作）(0121500104)</td>
            <td>6</td>
            <td>4</td>
            <td>16</td>
            <td>0</td>
        </tr>
        <tr>
            <td>3</td>
            <td>新闻学（媒介融合方向）(0121500105)</td>
            <td>6</td>
            <td>4</td>
            <td>16</td>
            <td>0</td>
        </tr>
    </table>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../layui/jquery-1.12.4.min.js"></script>
<script>
    layui.use('element',"laydate", function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#test1'
        });
        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>
<script>
    $(function () {
        $(".choose").click(function () {
            layer.open({
                type: 1,
                title: '计划',
                area: ['100%', '100%;'],
                content: $('#jihua')
            });
        })
    })
</script>
</body>
</html>
